The Internet provides access to a wide range of resources. For example, web pages for particular subjects are accessible over the Internet. Access to these resources presents opportunities for providing advertisements with the resources. A web page can, for example, include advertisement slots for presenting advertisements. These advertisements slots can be defined for presentation with a web page, for example, in a pop-up window. The advertisements slots can also be defined in the web page.
When a user performs a search using query terms, the query terms are used to identify relevant advertisements for the slots. The advertisements can sometimes be identified based on an exact match of the query to the keywords associated with the advertisements. Alternatively, the advertisements may be identified based on an expanded match where the query is associated with keywords and the advertisement keywords are compared against these keywords. The keywords that are associated with the query need to be ones that are related to the query in order to identify the most relevant advertisements. Many different signals can be used to identify relevant keywords to associate with queries.